﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace PJ.Data.SalePurchase
{
    [Serializable]
    [DataContract]
    public abstract class BaseShoppingCartData : BaseEntityExtensionData, IShoppingCartData
    {
        protected BaseShoppingCartData()
        {
        }

        private string _Reference;

        [DataMember]
        public string Reference
        {
            get { return _Reference; }
            set { _Reference = value; }
        }

        public override IObjectData Init(IObjectData data)
        {
            base.Init(data);
            this.Reference = ((IShoppingCartData)data).Reference;
            return this;
        }
        public override IObjectData Copy(IObjectData data)
        {
            base.Copy(data);
            this.Reference = ((IShoppingCartData)data).Reference;
            return this;
        }
        public override bool IsEqual(IObjectData data)
        {
            if (base.IsEqual(data))
                if (((IShoppingCartData)data).Reference == this.Reference)
                    return true;
            return false;
        }

    }
}
